//
//  CommonApi.h
//  BadBoy
//
//  Created by wen on 2017/3/10.
//  Copyright © 2017年 com.8xiong. All rights reserved.
//

#ifndef CommonApi_h
#define CommonApi_h


#endif /* CommonApi_h */

//#define KBDTestEnvelopement  @"kBDTest"

#ifdef KBDTestEnvelopement

#define KBDBaseURL         @"http://api.beboy.me:8081/api/"
#define KHuanxinKey         @"1140170925115599#beboy-test"

#else

#define KBDBaseURL         @"http://api.beboy.me/api/"
#define KHuanxinKey        @"1143170520115372#beboy"

#endif

/***  url  ***/

#define isIos7System [[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0
#define ApplicationDelegate ((AppDelegate *)[UIApplication sharedApplication].delegate)

/****     key value    ****/
#define k// BDLogin            @"isLogin"
#define BaseUserTable          @"baseUserTable"      //城市数据库表名
#define FriendsTable_Name           @"friendsList"          //数据库中好友表名
#define ApplyFriendTable_Name           @"ApplyFriendList"

/****     frame    ****/
#define kBDScreenWidth  ([UIScreen mainScreen ].bounds.size.width)
#define kBDScreenHeight ([UIScreen mainScreen ].bounds.size.height)

#define kBDStatusBarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
#define kBDNavBarHeight 44.0
#define kBDTabBarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height>20?83:49)
#define kBDTopHeight (kBDStatusBarHeight + kBDNavBarHeight)

#define kBDButtonHeight 44

/****     默认图片   ****/
#define kBDUserAvatar   [UIImage imageNamed:@"avatar"]


/****     color    ****/

#define kBDColorGray [UIColor colorWithRed:223/255.0 green:225/255.0 blue:231/255.0 alpha:1]                    //背景颜色
#define kBDTextBlackColorGray [UIColor colorWithRed:242/255.0 green:242/255.0 blue:242/255.0 alpha:1]                    //转发文本背景颜色
#define kBDNavbarTextForegroundColor @{NSForegroundColorAttributeName: [UIColor whiteColor]}
#define KBDNameColor [UIColor colorWithRed:28/255.0 green:28/255.0 blue:28/255.0 alpha:1]            //名字颜色
#define kBDTimeColor [UIColor colorWithRed:151/255.0 green:156/255.0 blue:172/255.0 alpha:1]            //时间和数字颜色
#define KBDColorBlue [UIColor colorWithHexString:@"#4d7aad"]
#define KBDColorDeepBlue [UIColor colorWithRed:76/255.0 green:122/255.0 blue:173/255.0 alpha:1.0f]
//黑色透明遮盖视图
#define KBDColorBlack [UIColor colorWithRed:1.0/255.0 green:1.0/255.0 blue:1.0/255.0 alpha:0.4f]

#define kNOValidColor   [UIColor colorWithHexString:@"cccccc"]
#define kCodeButtonColor    [UIColor colorWithHexString:@"14cd67"]
#define kLoginButtonColor   [UIColor colorWithRed:79/255.0 green:123/255.0 blue:171/255.0 alpha:1.0f]


typedef void (^BDBlockHandler)(id obj, NSError * error);
/****      版本号      ****/

/**
 *  NSLOG
 */
#ifdef DEBUG
//# define BDLog(fmt, ...) NSLog((fmt @"\n文件名:%@\n" "函数名:%s\n" "行号:%d\n"), ##__VA_ARGS__, [self class], __FUNCTION__, __LINE__);
# define BDLog(fmt, ...) NSLog((fmt @"\n文件名:%@ 行号:%d\n"), ##__VA_ARGS__, [self class], __LINE__);
#else
# define BDLog(...);
#endif


#define CachePaths                  [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]

#define DocumentPath                [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]
#define GroupRefrencePath           [DocumentPath stringByAppendingPathComponent:@"groupReference.plist"]

#define kTableNamePath               [DocumentPath stringByAppendingPathComponent:@"tableNameDic.plist"]

//统计相关
#define MerchantName_callShop       @"Merchant_call"
#define MerchantType_callShop       @"type"

#define ASLocalizedString(x) NSLocalizedString(x,nil)

typedef NS_ENUM(NSUInteger, BDShopType) {
    BDShopTypeSangna    = 1,//桑拿
    BDShopTypekTV       =2,//KTV
    BDShopTypeYezonghui =3,//夜总会
    BDShopTypeJiuba     =4,//酒吧
    BDShopTypeMuzu      =5,//沐足
    BDShopTypeOther     =12//其他
};
